<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<html>
<body class="easyui-layout list_body">
	<form id="logInterDataForm" name="logInterDataForm">
		<div class="list_body_north" data-options="region:'north'" border="false">
			<!-- 查询表单 -->
			<div style="padding: 3px" class="easyui-panel datagrid-toolbar">
				<div>
					<span>接口数据报送起始日期:</span> 
					<input type="text" id="startDate" value="${currentDate}" name="startDate" class="easyui-datebox" data-options="editable:false" style="line-height: 26px; border: 1px solid #ccc;" />
					<span>接口数据报送结束日期:</span>
					<input type="text" id="endDate" value="${currentDate}" name="endDate" class="easyui-datebox" data-options="editable:false" style="line-height: 26px; border: 1px solid #ccc;" />
					<span>接口类型:</span>
					<code:codeSelect name="inter_type" id="inter_type" code_type="INTER_TYPE" showSelect="true"></code:codeSelect>
					<span>接口业务类型:</span>
					<code:codeSelect name="workflow_type" id="workflow_type" code_type="WORKFLOW_TYPE" showSelect="true"></code:codeSelect>
					<br /> 
					<span>会员编号:</span> 
					<input id="mchnt_cd" type="text" name="mchnt_cd"  class="easyui-textbox" >
					<span>渠道方商户号:</span> 
					<input id="trf_mchnt_cd" type="text" name="trf_mchnt_cd"  class="easyui-textbox" >
					<span>通道编号:</span>
					<input class="easyui-combobox" id="channel_no" name="channel_no" >
					<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch() ">查询</a> 
					<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm() ">重置</a>
				</div>
			</div>
		</div>
		<div data-options="region:'center'" border="false" class="list_body_center">
			<!-- 表格 -->
			<table id="logInterDataTableId" fit="true"></table>
		</div>
	</form>
</body>
<script type="text/javascript">
	function doSearch() {
		grid.load({
			startDate : $('#startDate').val(),
			endDate : $('#endDate').val(),
			inter_type : $('#inter_type').val(),
			workflow_type : $('#workflow_type').val(), 
			mchnt_cd : $('#mchnt_cd').val(),
			trf_mchnt_cd : $('#trf_mchnt_cd').val(),
			channel_No : $('#channel_No').val()
		});
	}
	var grid;
	$(document).ready(function() {
		$.ajax({
            type: 'POST',
            url: "../channelinf/getChannelByTp.do?chn_tp=1",
            success: function(data) {
                var msg = [];
                msg.push({ "id": "", "text": "---请选择---" });
                for(var i=0;i<data.length;i++){
                    msg.push({ "id": data[i].ID, "text": data[i].TEXT });
                }
                $("#channel_no").combobox({
                    data:msg,
                    valueField:'id',
                    textField:'text',
                    panelHeight:'auto',
                    onLoadSuccess:function(param){
                        var channel_no="";
                        if(param.length>0){
                            channel_no=param[0].id;
                        }
                    }
                });
            }
        });
		grid = $("#logInterDataTableId").jpgrid({
			url : "getloginterdataJson.do",
			baseColumns : false,
			columns : [{
				title : "接口数据报送时间",
				field : "REC_CRT_TS",
				width : 150
			}, {
				title : "接口类型",
				field : "INTER_TYPE",
				width : 120
			}, {
				title : "接口业务类型",
				field : "WORKFLOW_TYPE",
				width : 320
			}, {
				title : "会员名称",
				field : "MCHNT_NM",
				width : 160
			}, {
				title : "会员编号",
				field : "MCHNT_CD",
				width : 160
			}, {
				title : "渠道方商户号",
				field : "TRF_MCHNT_CD",
				width : 160
			}, {
				title : "渠道方终端号",
				field : "TRF_TERM_ID",
				width : 160
			}, {
				title : "请求报文",
				field : "REQ_CONTENT",
				width : 200
			}, {
				title : "响应报文",
				field : "RES_CONTENT",
				width : 200
			}, {
				title : "响应消息",
				field : "RSP_CODE",
				width : 300
			}, {
				title : "渠道流水号(查询号)",
				field : "QUERY_NO",
				width : 160
			}, {
				title : "审核意见",
				field : "AUDIT_MSG",
				width : 160
			}, {
				title : "审核时间",
				field : "AUDIT_TM",
				width : 160
			}, {
				title : "通道编号",
				field : "CHANNEL_NO",
				width : 250
			}, {
				title : "完成时间",
				field : "COM_TM",
				width : 160
			}, {
				title : "修改的用户标识",
				field : "REC_UPD_USR_ID",
				width : 120
			}]
		});
	});
</script>
</html>
